// component/contactStyle/contactStyle.js
import p from "../../utils/platform.js";
import api from "../../common/api.js";
Component({
  /**
   * 组件的属性列表
   */
  properties: {
    kefuInfo: {
      type: Object,
      default: {}
    }
  },

  /**
   * 组件的初始数据
   */
  data: {

  },

  /**
   * 组件的方法列表
   */
  methods: {
    openContact() {
      this.setData({
        contactStyle: true
      })
    },
    handleChangeIndex() {
      this.triggerEvent('handleClose')

      if (this.data.kefuInfo && this.data.kefuInfo.close) {
        this.data.kefuInfo.close()
      }
    },
    goCompanyW() {
      let url = 'https://mp.weixin.qq.com/s/RNafos4k3y9kD_gPWE8FJA';
      wx.navigateTo({
        url: `/pages/webView/webView?webViewUrl=${url}`
      })
    },
    hanldeKefu() {
      p.makePhoneCall({
        phoneNumber: '15618248836'
      })
      api.insertMinePageOperationLog({
        logType: "0"
      })
    },
  }
})
